package com.gopay.common.cps.dao.fund.impl;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.fund.FundAcpsAcctMastDao;
import com.gopay.common.domain.acps.AcpsAcctMast;
import com.gopay.common.domain.fund.FundGopayBankcardInfoEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by baiyunpeng on 16/5/10.
 */


@Repository("fundAcpsAcctMastDao")
public class FundAcpsAcctMastDaoImpl extends BaseDAOImpl<AcpsAcctMast, String> implements FundAcpsAcctMastDao {


    @Override
    public List<AcpsAcctMast> getFundTwoAcct(Map<String, Object> maps) {

        String custId = (String) maps.get("custId");

        if(custId!=null && !"".equals(custId)) {
            StringBuilder sql = new StringBuilder(
                    "select acctId from AcpsAcctMast t where t.custId=:custId"
            );

            Map<String,Object> map = new HashMap<>();
            map.put("custId",custId);
            List<AcpsAcctMast> byHql = findByHql(sql.toString(), map);
            return byHql;
        }

            return null;
    }
}
